<div class="login-bg p-f">
    <div class="container">
        <div class="login-box">
            <form name="myForm" role="form">
                <div class="form-group">
                    <div class="input-group" ng-class="{'has-error':myForm.phone.$dirty && myForm.phone.$invalid}">
                    <!--<div class="input-group">-->
                        <label class="input-group-addon"><span class="glyphicon glyphicon-user"></span></label>
                        <!--<input type="text" class="form-control" validator="phone" ng-model="user.phone"  placeholder="请输入手机号" />-->
                        <input type="text" class="form-control" name="phone" ng-model="user.phone" ng-required="true" ng-pattern="/^1[3|4|5|7|8][0-9]{9}$/"  placeholder="请输入手机号" autocomplete="off" />
                    </div>
                    <div ng-show="myForm.phone.$error.pattern && myForm.phone.$dirty" class="alert alert-danger help-block">
                        请输入正确的手机号！
                    </div>
                </div>

                <div class="form-group">
                    <div class="input-group" ng-class="{'has-error':myForm.password.$dirty && myForm.password.$invalid}">
                        <label class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></label>
                        <input type="password" class="form-control" name="password" autocomplete="off" ng-model="user.password" ng-required="true" ng-minlength="6" ng-maxlength="12" placeholder="请输入密码" />
                    </div>
                    <div ng-show="myForm.password.$error.minlength && myForm.password.$dirty" class="alert alert-danger help-block">
                        输入长度不能小于6位
                    </div>
                    <div ng-show="myForm.password.$error.maxlength && myForm.password.$dirty" class="alert alert-danger help-block">
                        输入长度不能大于12位
                    </div>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <input type="text" class="form-control" name="authCode" autocomplete="off" ng-model="user.authCode" ng-init="user.authCode=''"  ng-required="true" ng-maxlength="6" ng-minlength="6" placeholder="请输入验证码" />
                        <div class="input-group-btn">
                            <button class="btn btn-info" ng-class="time?'disabled':''" ng-disabled="user.phone==''||user.phone==undefined" ng-click="time?1==1:send()">{{time?time:'获取验证码'}}</button>
                        </div>
                    </div>
                    <div ng-show="myForm.authCode.$error.minlength && myForm.authCode.$dirty" class="alert alert-danger help-block">
                        输入长度不能小于6位
                    </div>
                    <div ng-show="myForm.authCode.$error.maxlength && myForm.authCode.$dirty" class="alert alert-danger help-block">
                        输入长度不能大于6位
                    </div>
                </div>

                <div class="form-group">
                    <button class="btn btn-info btn-block" ng-disabled="myForm.$invalid || user.phone == undefined || user.password.length == 0 " ng-click="sumbit()">注册</button>
                </div>

                <div class="form-group">
                    <button class="btn btn-success btn-block" ui-sref="login">登录</button>
                </div>

                <div class="form-group">
                    <button class="btn btn-warning btn-block" ng-click="back()">返回</button>
                </div>

            </form>
        </div>
    </div>
</div>
